package io.renren.modules.member.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.renren.modules.member.entity.ExamEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.Date;

@Mapper
public interface ExamDao extends BaseMapper<ExamEntity> {

//    @Select("SELECT " + ExamEntity.SQL_COLUMN + " FROM physical_exam t WHERE t.student_code = #{studentCode} AND t.exam_date = #{examDate} AND t.flag = #{flag} LIMIT 1 ")
//    ExamEntity findByStuCodeAndExdateAndFlag(@Param("studentCode") String studentCode, @Param("examDate") Date examDate, @Param("flag") String flag);

    @Select("SELECT " + ExamEntity.SQL_COLUMN + " FROM physical_exam t WHERE t.student_code = #{studentCode} AND t.exam_date = #{examDate} LIMIT 1 ")
    ExamEntity findByStuCodeAndExdate(@Param("studentCode") String studentCode, @Param("examDate") Date examDate);

}
